home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************/
- /* */
- /* Source - Calendar.h */
- /* Author - Alexander S. Colwell, Copyright © 1990 */
- /* */
- /* Purpose - This is Calendar's include file */
- /* */
- /************************************************************************/
-
- #ifndef _Calendar_ /* Check if has not been include */
- #define _Calendar_ /* Mark it included */
-
- #include "4th Class.h" /* 4th Ext Area Class defs */
-
- #define headerHeight 16 /* Header height for month/year area*/
-
- struct CCalendar : C4th { /* Calendar object data structure */
-
- /* Variable instances */
- short month; /* Current month */
- short year; /* Current year */
- short dayIndex; /* Day idx in 1st row cell */
- unsigned long daySelect; /* Current day selection */
- RgnHandle nextMonth; /* Next month control handle */
- RgnHandle prevMonth; /* Previous month control handle */
-
- /* Working variable definitions */
- short dayWidth; /* Day width */
- short dayHeight; /* Day height */
-
- /* Method instances */
- void IExtArea(short); /* External area initialization */
- void Close(void); /* Close external area */
- void Cursor(Point); /* Cursor */
- void SetupValues(void); /* Setup working values */
- void Draw(void); /* Draw method */
- void DrawDay(char *,short,short);/* Draw cell */
- void HiliteDay(short,short); /* Hilite day */
- void DayRect(Rect *,short,short);/* Get day rect area */
- short MakeDayOutline(void); /* Make day outline rgn using tmpRgn*/
- void Select(void); /* Do ext area selection */
- void Deselect(void); /* Do ext area deselection */
- void Scroll(void); /* Scroll ext area */
- void DoClick(Point,short,long);/* Do click method */
- short GetDays(void); /* Get number of days for this month*/
- short GetDayIndex(void); /* Get day's index base offset */
- short GetRowIndex(short); /* Get row index base offset */
- short GetColumnIndex(short); /* Get column index base offset */
- short LeapYear(void); /* Check if it's leap year */
- };
-
- #endif
-